package com.elt.config;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class PropertiesConfig {
	public static final String RAM_ONECACHE = "RAMOneCache";
	public static final String RAM_TWOCACHE = "RAMTwoCache";
	public static final String IMG_CACHE_DIR = "imgDir";
	public static final String DATA_CACHE_DIR = "dataDir";
	public static final String DATA_CACHE_SIZE = "dataCacheSize";
	public static final String IMG_CACHE_SIZE = "imgCacheSize";
	public static final String DATA_NAME = "DATA_NAME";

	// *****************

	private static final Properties config = new Properties();
	private static final String configPath = "/assets/config.properties";

	public static void init() {
		InputStream in = PropertiesConfig.class.getResourceAsStream(configPath);
		try {
			config.load(in);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	public static Object getValue(String key) {
		return config.get(key);
	}

}
